/**
 * Copyright 2018 人人开源 http://www.renren.io
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package com.gxll.demo.mutipiledatasource.modules.demo.controller;

import com.gxll.demo.mutipiledatasource.modules.demo.service.SysOssService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

/**
 * 文件上传
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2017-03-25 12:13:26
 */
@RestController
@RequestMapping("sys/oss")
public class SysOssController {

    @Resource
    private SysOssService sysOssService;

    /**
     * 列表
     */
    @Scheduled(fixedRate = 10000)
    @RequestMapping("/list")
    public void list() {
        sysOssService.queryPage(new HashMap<>());

    }


    /**
     * 列表
     */
    @RequestMapping("/list2")
    public void list2(@RequestParam Map<String, Object> params) {
        sysOssService.queryPage2(params);

    }


}
